home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / eplain-2.6.tar.gz / eplain-2.6.tar / eplain-2.6 / doc / eplain.info-3 (.txt) < prev    next >
GNU Info File  |  1994-05-02  |  47KB  |  806 lines

  1. This is Info file eplain.info, produced by Makeinfo-1.55 from the input
  2. file eplain.texi.
  3.   This file documents the Eplain macros.
  4.   Copyright (C) 1989, 90, 91, 92, 93, 94 Karl Berry.  Steven Smith
  5. wrote the documentation for the commutative diagram macros.  (He also
  6. wrote the macros.)
  7.   Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.   Permission is granted to copy and distribute modified versions of this
  11. manual under the conditions for verbatim copying, provided also that the
  12. section entitled "GNU General Public License" is included exactly as in
  13. the original, and provided that the entire resulting derived work is
  14. distributed under the terms of a permission notice identical to this
  15.   Permission is granted to copy and distribute translations of this
  16. manual into another language, under the above conditions for modified
  17. versions, except that the section entitled "GNU General Public License"
  18. may be included in a translation approved by the author instead of in
  19. the original English.
  20. File: eplain.info,  Node: Allocation macros,  Next: Iteration,  Prev: Category codes,  Up: Programming definitions
  21. Allocation macros
  22. =================
  23.   Plain TeX provides macros that allocate registers of each primitive
  24. type in TeX, to prevent different sets of macros from using the same
  25. register for two different things.  The macros are all named starting
  26. with `new', e.g., `\newcount' allocates a new "count" (integer)
  27. register.  Such allocations are usually needed only at the top level of
  28. some macro definition file; therefore, plain TeX makes the allocation
  29. registers `\outer', to help find errors.  (The error this helps to find
  30. is a missing right brace in some macro definition.)
  31.   Sometimes, however, it is useful to allocate a register as part of
  32. some macro.  An outer control sequence cannot be used as part of a macro
  33. definition (or in a few other contexts: the parameter text of a
  34. definition, an argument to a definition, the preamble of an alignment,
  35. or in conditional text that is being skipped).  Therefore, Eplain
  36. defines "inner" versions of all the allocation macros, named with the
  37. prefix `inner': `\innernewbox', `\innernewcount', `\innernewdimen',
  38. `\innernewfam', `\innernewhelp', `\innernewif', `\innernewinsert',
  39. `\innernewlanguage', `\innernewread',
  40. `\innernewskip', `\innernewtoks', `\innernewwrite'.
  41.   You can also define non-outer versions of other macros in the same way
  42. that Eplain defines the above.  The basic macro is called `\innerdef':
  43.      \innerdef \INNERNAME {OUTERNAME}
  44.   The first argument (\INNERNAME) to `\innerdef' is the control
  45. sequence that you want to define.  Any previous definition of
  46. \INNERNAME is replaced.  The second argument (OUTERNAME) is the
  47. *characters* in the name of the outer control sequence.  (You can't use
  48. the actual control sequence name, since it's outer!)
  49.   If the outer control sequence is named \CS, and you want to define
  50. `innerCS' as the inner one, you can use `\innerinnerdef', which is just
  51. an abbreviation for a call to `\innerdef'.  For example, these two
  52. calls are equivalent:
  53.      \innerdef\innerproclaim{proclaim}
  54.      \innerinnerdef{proclaim}
  55. File: eplain.info,  Node: Iteration,  Next: Macro arguments,  Prev: Allocation macros,  Up: Programming definitions
  56. Iteration
  57. =========
  58.   You can iterate through a comma-separated list of items with `\for'.
  59. Here is an example:
  60.      \for\name:=karl,kathy\do{%
  61.         \message{\name}%
  62.      }%
  63.   This writes `karl' and `kathy' to the terminal.  Spaces before or
  64. after the commas in the list, or after the `:=', are *not* ignored.
  65.   `\for' expands the iterated values fully (with `\edef'), so this is
  66. equivalent to the above:
  67.      \def\namelist{karl,kathy}%
  68.      \for\name:=\namelist\do ...
  69. File: eplain.info,  Node: Macro arguments,  Next: Converting to characters,  Prev: Iteration,  Up: Programming definitions
  70. Macro arguments
  71. ===============
  72.   It is occasionally useful to redefine a macro that takes arguments to
  73. do nothing.  Eplain defines `\gobble', `\gobbletwo', and `\gobblethree'
  74. to swallow one, two, and three arguments, respectively.
  75.   For example, if you want to produce a "short" table of contents--one
  76. that includes only chapters, say--the easiest thing to do is read the
  77. entire `.toc' file (*note Contents::.), and just ignore the commands
  78. that produce section or subsection entries.  To be specific:
  79.      \let\tocchapterentry = \shorttocchapter
  80.      \let\tocsectionentry = \gobbletwo
  81.      \let\tocsubsectionentry = \gobbletwo
  82.      \readtocfile
  83.    (Of course, this assumes you only have chapters, sections, and
  84. subsections in your document.)
  85. In addition, Eplain defines `\eattoken' to swallow the single following
  86. token, using `\let'.  Thus, `\gobble' followed by `{...}' ignores the
  87. entire brace-enclosed text.  `\eattoken' followed by the same ignores
  88. only the opening left brace.
  89.   Eplain defines a macro `\identity' which takes one argument and
  90. expands to that argument.  This may be useful if you want to provide a
  91. function for the user to redefine, but don't need to do anything by
  92. default.  (For example, the default definition of `\eqconstruct' (*note
  93. Formatting equation references::.) is `\identity'.)
  94.   You may also want to read an optional argument.  The established
  95. convention is that optional arguments are put in square brackets, so
  96. that is the syntax Eplain recognizes.  Eplain ignores space tokens
  97. before an optional argument, via `\futurenonspacelet'.
  98.   You test for an optional argument by using `\@getoptionalarg'.  It
  99. takes one argument, a control sequence to expand after reading the
  100. argument, if present.  If an optional argument is present, the control
  101. sequence `\@optionalarg' expands to it; otherwise, `\@optionalarg' is
  102. `\empty'.  You must therefore have the category code of `@' set to 11
  103. (letter).  Here is an example:
  104.      \catcode`@=\letter
  105.      \def\cmd{\@getoptionalarg\finishcmd}
  106.      \def\finishcmd{%
  107.        \ifx\@optionalarg\empty
  108.          % No optional argument present.
  109.        \else
  110.          % One was present.
  111.        \fi
  112.      }
  113.   If an optional argument contains another optional argument, the inner
  114. one will need to be enclosed in braces, so TeX does not mistake the end
  115. of the first for the end of the second.
  116. File: eplain.info,  Node: Converting to characters,  Next: Expansion,  Prev: Macro arguments,  Up: Programming definitions
  117. Converting to characters
  118. ========================
  119.   Eplain defines  `\xrlabel' to produce control sequence names for
  120. cross-reference labels, et al.  This macro expands to its argument with
  121. an `_' appended.  (It does this because the usual use of `\xrlabel' is
  122. to generate a control sequence name, and we naturally want to avoid
  123. conflicts between control sequence names.)
  124.   Because `\xrlabel' is fully expandable, to make a control sequence
  125. name out of the result you need only do
  126.      `\csname \xrlabel{LABEL}\endcsname'
  127. The `\csname' primitive makes a control sequence name out of any
  128. sequence of character tokens, regardless of category code.  Labels can
  129. therefore include any characters except for `\', `{', `}', and `#', all
  130. of which are used in macro definitions themselves.
  131.   `\sanitize' takes a control sequence as an argument and converts the
  132. expansion of the control sequence into a list of character tokens.
  133. This is the behavior you want when writing information like chapter
  134. titles to an output file.  For example, here is part of the definition
  135. of `\writenumberedtocentry'; `#2' is the title that the user has given.
  136.      ...
  137.      \def\temp{#2}%
  138.      ...
  139.        \write\tocfile{%
  140.          ...
  141.          \sanitize\temp
  142.          ...
  143.        }%
  144. File: eplain.info,  Node: Expansion,  Next: Obeying spaces,  Prev: Converting to characters,  Up: Programming definitions
  145. Expansion
  146. =========
  147.   This section describes some miscellanous macros for expansion, etc.
  148. * Menu:
  149. * \csn and \ece::               Abbreviations for \csname expansions.
  150. * \edefappend::
  151. * Hooks::                       Manipulating and executing named actions.
  152. * Properties::                  Associating information with a csname.
  153. * \expandonce::
  154. * \ifundefined::
  155. * \futurenonspacelet::
  156. File: eplain.info,  Node: \csn and \ece,  Next: \edefappend,  Up: Expansion
  157. `\csn' and `\ece'
  158. -----------------
  159.   `\csn'{NAME} simply abbreviates `\csname' NAME `\encsname', thus
  160. saving some typing.  The extra level of expansion does take some time,
  161. though, so I don't recommend it for an inner loop.
  162.   `\ece'{TOKEN}{NAME} abbreviates
  163.      \expandafter TOKEN \csname NAME \endcsname
  164. For example,
  165.      \def\fontabbrevdef#1#2{\ece\def{@#1font}{#2}}
  166.      \fontabbrevdef{normal}{ptmr}
  167. defines a control sequence `\@normalfont' to expand to `ptmr'.
  168. File: eplain.info,  Node: \edefappend,  Next: Hooks,  Prev: \csn and \ece,  Up: Expansion
  169. `\edefappend'
  170. -------------
  171.   `\edefappend' is a way of adding on to an existing definition.  It
  172. takes two arguments: the first is the control sequence name, the second
  173. the new tokens to append to the definition.  The second argument is
  174. fully expanded (in the `\edef' that redefines the control sequence).
  175.   For example:
  176.      \def\foo{abc}
  177.      \def\bar{xyz}
  178.      \edefappend\foo{\bar karl}
  179. results in `\foo' being defined as `abcxyzkarl'.
  180. File: eplain.info,  Node: Hooks,  Next: Properties,  Prev: \edefappend,  Up: Expansion
  181. Hooks
  182. -----
  183.   A "hook" is simply a name for a group of actions which is executed in
  184. certain places--presumably when it is most useful to allow
  185. customization or modification.  TeX already provides many builtin
  186. hooks; for example, the `\every ...' token lists are all examples of
  187. hooks.
  188.   Eplain provides several macros for adding actions to hooks.  They all
  189. take two arguments: the name of the hook and the new actions.
  190. `hookaction NAME ACTIONS'
  191. `hookappend NAME ACTIONS'
  192. `hookprepend NAME ACTIONS'
  193.      Each of these adds ACTIONS to the hook NAME.  (Any
  194.      previously-defined actions are retained.)  NAME is not a control
  195.      sequence, but rather the characters of the name.
  196. `hookactiononce NAME `\CS''
  197.      `\hookactiononce' adds CS to NAME, like the macros above, but
  198.      first it adds
  199.           \global\let \CS \relax
  200.      to the definition of \CS.  (This implies \CS must be a true
  201.      expandable macro, not a control sequence `\let' to a primitive or
  202.      some other such thing.)  Thus, \CS is expanded the next time the
  203.      hook NAME is run, but it will disappear after that.
  204.      The `\global' is useful because `\hookactiononce' is most useful
  205.      when the grouping structure of the TeX code could be anything.
  206.      Neither this nor the other hook macros do global assignments to
  207.      the hook variable itself, so TeX's usual grouping rules apply.
  208.   The companion macro to defining hook actions is `\hookrun', for
  209. running them.  This takes a single argument, the name of the hook.  If
  210. no actions for the hook are defined, no error ensues.
  211.   Here is a skeleton of general `\begin' and `\end' macros that run
  212. hooks, and a couple of calls to define actions.  The use of
  213. `\hookprepend' for the begin action and `\hookappend' for the end
  214. action ensures that the actions are executed in proper sequence with
  215. other actions (as long as the other actions use `\hookprepend' and
  216. `\hookappend' also).
  217.      \def\begin#1{ ... \hookrun{begin} ... }
  218.      \def\end#1{ ... \hookrun{end} ... }
  219.      \hookprepend{begin}\start_underline
  220.      \hookappend{end}\finish_underline
  221. File: eplain.info,  Node: Properties,  Next: \expandonce,  Prev: Hooks,  Up: Expansion
  222. Properties
  223. ----------
  224.   A "property" is a name/value pair associated with another symbol,
  225. traditionally called an "atom".  Both atom and property names are
  226. control sequence names.
  227.   Eplain provides two macros for dealing with property lists:
  228. `\setproperty' and `\getproperty'.
  229. `\setproperty ATOM PROPNAME VALUE'
  230.      `\setproperty' defines the property PROPERTY on the atom ATOM to
  231.      be VALUE.  ATOM and PROPNAME can be anything acceptable to
  232.      `\csname'.  VALUE can be anything.
  233. `\getproperty ATOM PROPNAME'
  234.      `\getproperty' expands to the value stored for PROPNAME on ATOM.
  235.      If PROPNAME is undefined, it expands to nothing (i.e., `\empty').
  236.   The idea of properties originated in Lisp (I believe).  There, the
  237. implementation truly does associate properties with atoms.  In TeX,
  238. where we have no builtin support for properties, the association is only
  239. conceptual.
  240.   The following example typesets `xyz'.
  241.      \setproperty{a}{pr}{xyz}
  242.      \getproperty{a}{pr}
  243. File: eplain.info,  Node: \expandonce,  Next: \ifundefined,  Prev: Properties,  Up: Expansion
  244. `\expandonce'
  245. -------------
  246.   `\expandonce' is defined as `\expandafter\noexpand'.  Thus,
  247. `\expandonce TOKEN' expands TOKEN once, instead of to TeX primitives.
  248. This is most useful in an `\edef'.
  249.   For example, the following defines `\temp' to be `\foo', not `abc'.
  250.      \def\foo{abc}
  251.      \def\bar{\foo}
  252.      \edef\temp{\expandonce\bar}
  253. File: eplain.info,  Node: \ifundefined,  Next: \futurenonspacelet,  Prev: \expandonce,  Up: Expansion
  254. `\ifundefined'
  255. --------------
  256.   `\ifundefined{CS} T \else F \fi' expands the T text if the control
  257. sequence `\CS' is undefined or has been `\let' to `\relax', and the F
  258. text otherwise.
  259.   Since `\ifundefined' is not a primitive conditional, it cannot be
  260. used in places where TeX might skip tokens "at high speed", e.g.,
  261. within another conditional--TeX can't match up the `\if''s and `\fi''s.
  262.   This macro was taken directly from `The TeXbook', page 308.
  263. File: eplain.info,  Node: \futurenonspacelet,  Prev: \ifundefined,  Up: Expansion
  264. `\futurenonspacelet'
  265. --------------------
  266.   The `\futurelet' primitive allows you to look at the next token from
  267. the input.  Sometimes, though, you want to look ahead ignoring any
  268. spaces.  This is what `\futurenonspacelet' does.  It is otherwise the
  269. same as `\futurelet': you give it two control sequences as arguments,
  270. and it assigns the next nonspace token to the first, and then expands
  271. the second.  For example:
  272.      \futurenonspacelet\temp\finishup
  273.      \def\finishup{\ifx\temp ...}
  274. File: eplain.info,  Node: Obeying spaces,  Next: Writing out numbers,  Prev: Expansion,  Up: Programming definitions
  275. Obeying spaces
  276. ==============
  277.   `\obeywhitespace' makes both end-of-lines and space characters in the
  278. input be respected in the output.  Unlike plain TeX's `\obeyspaces',
  279. even spaces at the beginnings of lines turn into blank space.
  280.   By default, the size of the space that is produced by a space
  281. character is the natural space of the current font, i.e., what `\ '
  282. produces.
  283.   Ordinarily, a blank line in the input produces as much blank vertical
  284. space as a line of text would occupy.  You can adjust this by assigning
  285. to the parameter `\blanklineskipamount': if you set this negative, the
  286. space produced by a blank line will be smaller; if positive, larger.
  287.   Tabs are not affected by this routine.  In particular, if tabs occur
  288. at the beginning of a line, they will disappear.  (If you are trying to
  289. make TeX do the "right thing" with tabs, don't.  Use a utility program
  290. like expand instead.)
  291. File: eplain.info,  Node: Writing out numbers,  Next: Mode-specific penalties,  Prev: Obeying spaces,  Up: Programming definitions
  292. Writing out numbers
  293. ===================
  294.   `\numbername' produces the written-out form of its argument, i.e.,
  295. `zero' through `ten' for the numbers 0-10, and numerals for all others.
  296. File: eplain.info,  Node: Mode-specific penalties,  Next: Auxiliary files,  Prev: Writing out numbers,  Up: Programming definitions
  297. Mode-specific penalties
  298. =======================
  299.   TeX's built-in `\penalty' command simply appends to the current list,
  300. no matter what kind of list it is.  You might intend a particular
  301. penalty to always be a "vertical" penalty, however, i.e., appended to a
  302. vertical list.  Therefore, Eplain provides `\vpenalty' and `\hpenalty'
  303. which first leave the other mode and then do `\penalty'.
  304.   More precisely, `\vpenalty' inserts `\par' if the current mode is
  305. horizontal, and `\hpenalty' inserts `\leavevmode' if the current mode
  306. is vertical.  (Thus, `\vpenalty' cannot be used in math mode.)
  307. File: eplain.info,  Node: Auxiliary files,  Prev: Mode-specific penalties,  Up: Programming definitions
  308. Auxiliary files
  309. ===============
  310.   It is common to write some information out to a file to be used on a
  311. subsequent run.  But when it is time to read the file again, you only
  312. want to do so if the file actually exists.  `\testfileexistence' is
  313. given an argument which is appended to `\jobname', and sets the
  314. conditional `\iffileexists' appropriately.
  315.   For example:
  316.      \testfileexistence{toc}%
  317.      \iffileexists
  318.         \input \jobname.toc
  319.      \fi
  320. File: eplain.info,  Node: Copying,  Next: Freedom,  Prev: Programming definitions,  Up: Top
  321. GNU GENERAL PUBLIC LICENSE
  322. **************************
  323.                          Version 2, June 1991
  324.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  325.      675 Mass Ave, Cambridge, MA 02139, USA
  326.      
  327.      Everyone is permitted to copy and distribute verbatim copies
  328.      of this license document, but changing it is not allowed.
  329. Preamble
  330. ========
  331.   The licenses for most software are designed to take away your freedom
  332. to share and change it.  By contrast, the GNU General Public License is
  333. intended to guarantee your freedom to share and change free
  334. software--to make sure the software is free for all its users.  This
  335. General Public License applies to most of the Free Software
  336. Foundation's software and to any other program whose authors commit to
  337. using it.  (Some other Free Software Foundation software is covered by
  338. the GNU Library General Public License instead.)  You can apply it to
  339. your programs, too.
  340.   When we speak of free software, we are referring to freedom, not
  341. price.  Our General Public Licenses are designed to make sure that you
  342. have the freedom to distribute copies of free software (and charge for
  343. this service if you wish), that you receive source code or can get it
  344. if you want it, that you can change the software or use pieces of it in
  345. new free programs; and that you know you can do these things.
  346.   To protect your rights, we need to make restrictions that forbid
  347. anyone to deny you these rights or to ask you to surrender the rights.
  348. These restrictions translate to certain responsibilities for you if you
  349. distribute copies of the software, or if you modify it.
  350.   For example, if you distribute copies of such a program, whether
  351. gratis or for a fee, you must give the recipients all the rights that
  352. you have.  You must make sure that they, too, receive or can get the
  353. source code.  And you must show them these terms so they know their
  354. rights.
  355.   We protect your rights with two steps: (1) copyright the software, and
  356. (2) offer you this license which gives you legal permission to copy,
  357. distribute and/or modify the software.
  358.   Also, for each author's protection and ours, we want to make certain
  359. that everyone understands that there is no warranty for this free
  360. software.  If the software is modified by someone else and passed on, we
  361. want its recipients to know that what they have is not the original, so
  362. that any problems introduced by others will not reflect on the original
  363. authors' reputations.
  364.   Finally, any free program is threatened constantly by software
  365. patents.  We wish to avoid the danger that redistributors of a free
  366. program will individually obtain patent licenses, in effect making the
  367. program proprietary.  To prevent this, we have made it clear that any
  368. patent must be licensed for everyone's free use or not licensed at all.
  369.   The precise terms and conditions for copying, distribution and
  370. modification follow.
  371.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  372.   1. This License applies to any program or other work which contains a
  373.      notice placed by the copyright holder saying it may be distributed
  374.      under the terms of this General Public License.  The "Program",
  375.      below, refers to any such program or work, and a "work based on
  376.      the Program" means either the Program or any derivative work under
  377.      copyright law: that is to say, a work containing the Program or a
  378.      portion of it, either verbatim or with modifications and/or
  379.      translated into another language.  (Hereinafter, translation is
  380.      included without limitation in the term "modification".)  Each
  381.      licensee is addressed as "you".
  382.      Activities other than copying, distribution and modification are
  383.      not covered by this License; they are outside its scope.  The act
  384.      of running the Program is not restricted, and the output from the
  385.      Program is covered only if its contents constitute a work based on
  386.      the Program (independent of having been made by running the
  387.      Program).  Whether that is true depends on what the Program does.
  388.   2. You may copy and distribute verbatim copies of the Program's
  389.      source code as you receive it, in any medium, provided that you
  390.      conspicuously and appropriately publish on each copy an appropriate
  391.      copyright notice and disclaimer of warranty; keep intact all the
  392.      notices that refer to this License and to the absence of any
  393.      warranty; and give any other recipients of the Program a copy of
  394.      this License along with the Program.
  395.      You may charge a fee for the physical act of transferring a copy,
  396.      and you may at your option offer warranty protection in exchange
  397.      for a fee.
  398.   3. You may modify your copy or copies of the Program or any portion
  399.      of it, thus forming a work based on the Program, and copy and
  400.      distribute such modifications or work under the terms of Section 1
  401.      above, provided that you also meet all of these conditions:
  402.        a. You must cause the modified files to carry prominent notices
  403.           stating that you changed the files and the date of any change.
  404.        b. You must cause any work that you distribute or publish, that
  405.           in whole or in part contains or is derived from the Program
  406.           or any part thereof, to be licensed as a whole at no charge
  407.           to all third parties under the terms of this License.
  408.        c. If the modified program normally reads commands interactively
  409.           when run, you must cause it, when started running for such
  410.           interactive use in the most ordinary way, to print or display
  411.           an announcement including an appropriate copyright notice and
  412.           a notice that there is no warranty (or else, saying that you
  413.           provide a warranty) and that users may redistribute the
  414.           program under these conditions, and telling the user how to
  415.           view a copy of this License.  (Exception: if the Program
  416.           itself is interactive but does not normally print such an
  417.           announcement, your work based on the Program is not required
  418.           to print an announcement.)
  419.      These requirements apply to the modified work as a whole.  If
  420.      identifiable sections of that work are not derived from the
  421.      Program, and can be reasonably considered independent and separate
  422.      works in themselves, then this License, and its terms, do not
  423.      apply to those sections when you distribute them as separate
  424.      works.  But when you distribute the same sections as part of a
  425.      whole which is a work based on the Program, the distribution of
  426.      the whole must be on the terms of this License, whose permissions
  427.      for other licensees extend to the entire whole, and thus to each
  428.      and every part regardless of who wrote it.
  429.      Thus, it is not the intent of this section to claim rights or
  430.      contest your rights to work written entirely by you; rather, the
  431.      intent is to exercise the right to control the distribution of
  432.      derivative or collective works based on the Program.
  433.      In addition, mere aggregation of another work not based on the
  434.      Program with the Program (or with a work based on the Program) on
  435.      a volume of a storage or distribution medium does not bring the
  436.      other work under the scope of this License.
  437.   4. You may copy and distribute the Program (or a work based on it,
  438.      under Section 2) in object code or executable form under the terms
  439.      of Sections 1 and 2 above provided that you also do one of the
  440.      following:
  441.        a. Accompany it with the complete corresponding machine-readable
  442.           source code, which must be distributed under the terms of
  443.           Sections 1 and 2 above on a medium customarily used for
  444.           software interchange; or,
  445.        b. Accompany it with a written offer, valid for at least three
  446.           years, to give any third party, for a charge no more than your
  447.           cost of physically performing source distribution, a complete
  448.           machine-readable copy of the corresponding source code, to be
  449.           distributed under the terms of Sections 1 and 2 above on a
  450.           medium customarily used for software interchange; or,
  451.        c. Accompany it with the information you received as to the offer
  452.           to distribute corresponding source code.  (This alternative is
  453.           allowed only for noncommercial distribution and only if you
  454.           received the program in object code or executable form with
  455.           such an offer, in accord with Subsection b above.)
  456.      The source code for a work means the preferred form of the work for
  457.      making modifications to it.  For an executable work, complete
  458.      source code means all the source code for all modules it contains,
  459.      plus any associated interface definition files, plus the scripts
  460.      used to control compilation and installation of the executable.
  461.      However, as a special exception, the source code distributed need
  462.      not include anything that is normally distributed (in either
  463.      source or binary form) with the major components (compiler,
  464.      kernel, and so on) of the operating system on which the executable
  465.      runs, unless that component itself accompanies the executable.
  466.      If distribution of executable or object code is made by offering
  467.      access to copy from a designated place, then offering equivalent
  468.      access to copy the source code from the same place counts as
  469.      distribution of the source code, even though third parties are not
  470.      compelled to copy the source along with the object code.
  471.   5. You may not copy, modify, sublicense, or distribute the Program
  472.      except as expressly provided under this License.  Any attempt
  473.      otherwise to copy, modify, sublicense or distribute the Program is
  474.      void, and will automatically terminate your rights under this
  475.      License.  However, parties who have received copies, or rights,
  476.      from you under this License will not have their licenses
  477.      terminated so long as such parties remain in full compliance.
  478.   6. You are not required to accept this License, since you have not
  479.      signed it.  However, nothing else grants you permission to modify
  480.      or distribute the Program or its derivative works.  These actions
  481.      are prohibited by law if you do not accept this License.
  482.      Therefore, by modifying or distributing the Program (or any work
  483.      based on the Program), you indicate your acceptance of this
  484.      License to do so, and all its terms and conditions for copying,
  485.      distributing or modifying the Program or works based on it.
  486.   7. Each time you redistribute the Program (or any work based on the
  487.      Program), the recipient automatically receives a license from the
  488.      original licensor to copy, distribute or modify the Program
  489.      subject to these terms and conditions.  You may not impose any
  490.      further restrictions on the recipients' exercise of the rights
  491.      granted herein.  You are not responsible for enforcing compliance
  492.      by third parties to this License.
  493.   8. If, as a consequence of a court judgment or allegation of patent
  494.      infringement or for any other reason (not limited to patent
  495.      issues), conditions are imposed on you (whether by court order,
  496.      agreement or otherwise) that contradict the conditions of this
  497.      License, they do not excuse you from the conditions of this
  498.      License.  If you cannot distribute so as to satisfy simultaneously
  499.      your obligations under this License and any other pertinent
  500.      obligations, then as a consequence you may not distribute the
  501.      Program at all.  For example, if a patent license would not permit
  502.      royalty-free redistribution of the Program by all those who
  503.      receive copies directly or indirectly through you, then the only
  504.      way you could satisfy both it and this License would be to refrain
  505.      entirely from distribution of the Program.
  506.      If any portion of this section is held invalid or unenforceable
  507.      under any particular circumstance, the balance of the section is
  508.      intended to apply and the section as a whole is intended to apply
  509.      in other circumstances.
  510.      It is not the purpose of this section to induce you to infringe any
  511.      patents or other property right claims or to contest validity of
  512.      any such claims; this section has the sole purpose of protecting
  513.      the integrity of the free software distribution system, which is
  514.      implemented by public license practices.  Many people have made
  515.      generous contributions to the wide range of software distributed
  516.      through that system in reliance on consistent application of that
  517.      system; it is up to the author/donor to decide if he or she is
  518.      willing to distribute software through any other system and a
  519.      licensee cannot impose that choice.
  520.      This section is intended to make thoroughly clear what is believed
  521.      to be a consequence of the rest of this License.
  522.   9. If the distribution and/or use of the Program is restricted in
  523.      certain countries either by patents or by copyrighted interfaces,
  524.      the original copyright holder who places the Program under this
  525.      License may add an explicit geographical distribution limitation
  526.      excluding those countries, so that distribution is permitted only
  527.      in or among countries not thus excluded.  In such case, this
  528.      License incorporates the limitation as if written in the body of
  529.      this License.
  530.  10. The Free Software Foundation may publish revised and/or new
  531.      versions of the General Public License from time to time.  Such
  532.      new versions will be similar in spirit to the present version, but
  533.      may differ in detail to address new problems or concerns.
  534.      Each version is given a distinguishing version number.  If the
  535.      Program specifies a version number of this License which applies
  536.      to it and "any later version", you have the option of following
  537.      the terms and conditions either of that version or of any later
  538.      version published by the Free Software Foundation.  If the Program
  539.      does not specify a version number of this License, you may choose
  540.      any version ever published by the Free Software Foundation.
  541.  11. If you wish to incorporate parts of the Program into other free
  542.      programs whose distribution conditions are different, write to the
  543.      author to ask for permission.  For software which is copyrighted
  544.      by the Free Software Foundation, write to the Free Software
  545.      Foundation; we sometimes make exceptions for this.  Our decision
  546.      will be guided by the two goals of preserving the free status of
  547.      all derivatives of our free software and of promoting the sharing
  548.      and reuse of software generally.
  549.                                 NO WARRANTY
  550.  12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  551.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  552.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  553.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  554.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  555.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  556.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  557.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  558.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  559.      SERVICING, REPAIR OR CORRECTION.
  560.  13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  561.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  562.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  563.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  564.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  565.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  566.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  567.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  568.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  569.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  570.                       END OF TERMS AND CONDITIONS
  571. Appendix: How to Apply These Terms to Your New Programs
  572. =======================================================
  573.   If you develop a new program, and you want it to be of the greatest
  574. possible use to the public, the best way to achieve this is to make it
  575. free software which everyone can redistribute and change under these
  576. terms.
  577.   To do so, attach the following notices to the program.  It is safest
  578. to attach them to the start of each source file to most effectively
  579. convey the exclusion of warranty; and each file should have at least
  580. the "copyright" line and a pointer to where the full notice is found.
  581.      ONE LINE TO GIVE THE PROGRAM'S NAME AND A BRIEF IDEA OF WHAT IT DOES.
  582.      Copyright (C) 19YY  NAME OF AUTHOR
  583.      
  584.      This program is free software; you can redistribute it and/or modify
  585.      it under the terms of the GNU General Public License as published by
  586.      the Free Software Foundation; either version 2 of the License, or
  587.      (at your option) any later version.
  588.      
  589.      This program is distributed in the hope that it will be useful,
  590.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  591.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  592.      GNU General Public License for more details.
  593.      
  594.      You should have received a copy of the GNU General Public License
  595.      along with this program; if not, write to the Free Software
  596.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  597.   Also add information on how to contact you by electronic and paper
  598. mail.
  599.   If the program is interactive, make it output a short notice like this
  600. when it starts in an interactive mode:
  601.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  602.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
  603.      This is free software, and you are welcome to redistribute it
  604.      under certain conditions; type `show c' for details.
  605.   The hypothetical commands `show w' and `show c' should show the
  606. appropriate parts of the General Public License.  Of course, the
  607. commands you use may be called something other than `show w' and `show
  608. c'; they could even be mouse-clicks or menu items--whatever suits your
  609. program.
  610.   You should also get your employer (if you work as a programmer) or
  611. your school, if any, to sign a "copyright disclaimer" for the program,
  612. if necessary.  Here is a sample; alter the names:
  613.      Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  614.      `Gnomovision' (which makes passes at compilers) written by James Hacker.
  615.      
  616.      SIGNATURE OF TY COON, 1 April 1989
  617.      Ty Coon, President of Vice
  618.   This General Public License does not permit incorporating your
  619. program into proprietary programs.  If your program is a subroutine
  620. library, you may consider it more useful to permit linking proprietary
  621. applications with the library.  If this is what you want to do, use the
  622. GNU Library General Public License instead of this License.
  623. File: eplain.info,  Node: Freedom,  Next: Macro index,  Prev: Copying,  Up: Top
  624. Regain your programming freedom
  625. *******************************
  626.   Until a few years ago, programmers in the United States could write
  627. any program they wished.  This freedom has now been taken away by two
  628. developments: software patents, which grant the patent holder an
  629. absolute monopoly on some programming technique, and user interface
  630. copyright, which forbid compatible implementations of an existing user
  631. interface.
  632.   In Europe, especially through the GATT treaty, things are rapidly
  633. approaching the same pass.
  634. * Menu:
  635. * Software patents::            Algorithm monopolies.
  636. * User interface copyright::    Forbidding upward-compatibility.
  637. * What to do?::                 What to do?
  638. File: eplain.info,  Node: Software patents,  Next: User interface copyright,  Up: Freedom
  639. Software patents
  640. ================
  641.   The U.S. Patent and Trademark Office has granted numerous software
  642. patents on software techniques.  Patents are an absolute
  643. monopoly--independent reinvention is precluded.  This monopoly lasts
  644. for seventeen years, i.e., forever (with respect to computer science).
  645.   One patent relevant to TeX is patent 4,956,809, issued to the Mark
  646. Williams company on September 11, 1990, applied for in 1982, which
  647. covers (among other things)
  648.      representing in a standardized order consisting of a standard
  649.      binary structure file stored on auxiliary memory or transported on
  650.      a communications means, said standardized order being different
  651.      from a different order used on at least one of the different
  652.      computers;
  653.      Converting in each of the different computers binary data read
  654.      from an auxiliary data storage or communications means from the
  655.      standardized order to the natural order of the respective host
  656.      computer after said binary data are read from said auxiliary data
  657.      storage or communications means and before said binary data are
  658.      used by the respective host computer; and
  659.      Converting in each of the different computers binary data written
  660.      into auxiliary data storage or communications means from the
  661.      natural order of the respective host computer to the standardized
  662.      order prior to said writing.
  663. ... in other words, storing data on disk in a machine-independent
  664. order, as the DVI, TFM, GF, and PK file formats specify.  Even though
  665. TeX is "prior art" in this respect, the patent was granted (the patent
  666. examiners not being computer scientists, even less computer
  667. typographers).  Since there is a strong presumption in the courts of a
  668. patent's validity once it has been granted, there is a good chance that
  669. users or implementors of TeX could be successfully sued on the issue.
  670.   As another example, the X window system, which was intended to be able
  671. to be used freely by everyone, is now being threatened by two patents:
  672. 4,197,590 on the use of exclusive-or to redraw cursors, held by Cadtrak,
  673. a litigation company (this has been upheld twice in court); and
  674. 4,555,775, held by AT&T, on the use of backing store to redraw windows
  675. quickly.
  676.   Here is one excerpt from a recent mailing by the League for
  677. Programming Freedom (*note What to do?::.) which I feel sums up the
  678. situation rather well.  It comes from an article in `Think' magazine,
  679. issue #5, 1990.  The comments after the quote were written by Richard
  680. Stallman.
  681.          "You get value from patents in two ways," says Roger Smith, IBM
  682.         Assistant General Counsel, intellectual property law.
  683.      "Through fees,     and through licensing negotiations that give
  684.      IBM access to other     patents.
  685.      "The IBM patent portfolio gains us the freedom to do what we need
  686.      to     do through cross-licensing--it gives us access to the
  687.      inventions of     others that are the key to rapid innovation.
  688.      Access is far more     valuable to IBM than the fees it receives
  689.      from its 9,000 active     patents.  There's no direct calculation
  690.      of this value, but it's many     times larger than the fee income,
  691.      perhaps an order of magnitude     larger."
  692.   This information should dispel the belief that the patent system will
  693. "protect" a small software developer from competition from IBM.  IBM
  694. can always find patents in its collection which the small developer is
  695. infringing, and thus obtain a cross-license.
  696.   However, the patent system does cause trouble for the smaller
  697. companies which, like IBM, need access to patented techniques in order
  698. to do useful work in software.  Unlike IBM, the smaller companies do
  699. not have 9,000 patents and cannot usually get a cross-license.  No
  700. matter how hard they try, they cannot have enough patents to do this.
  701.   Only the elimination of patents from the software field can enable
  702. most software developers to continue with their work.
  703.   The value IBM gets from cross-licensing is a measure of the amount of
  704. harm that the patent system would do to IBM if IBM could not avoid it.
  705. IBM's estimate is that the trouble could easily be ten times the good
  706. one can expect from one's own patents--even for a company with 9,000 of
  707. them.
  708. File: eplain.info,  Node: User interface copyright,  Next: What to do?,  Prev: Software patents,  Up: Freedom
  709. User interface copyright
  710. ========================
  711.   (This section is copied from the GCC manual, by Richard Stallman.)
  712.      This section is a political message from the League for Programming
  713.      Freedom to the users of the GNU font utilities.  It is included
  714.      here as an expression of support for the League on my part.
  715.   Apple, Lotus and Xerox are trying to create a new form of legal
  716. monopoly: a copyright on a class of user interfaces.  These monopolies
  717. would cause serious problems for users and developers of computer
  718. software and systems.
  719.   Until a few years ago, the law seemed clear: no one could restrict
  720. others from using a user interface; programmers were free to implement
  721. any interface they chose.  Imitating interfaces, sometimes with changes,
  722. was standard practice in the computer field.  The interfaces we know
  723. evolved gradually in this way; for example, the Macintosh user interface
  724. drew ideas from the Xerox interface, which in turn drew on work done at
  725. Stanford and SRI.  1-2-3 imitated VisiCalc, and dBase imitated a
  726. database program from JPL.
  727.   Most computer companies, and nearly all computer users, were happy
  728. with this state of affairs.  The companies that are suing say it does
  729. not offer "enough incentive" to develop their products, but they must
  730. have considered it "enough" when they made their decision to do so.  It
  731. seems they are not satisfied with the opportunity to continue to compete
  732. in the marketplace--not even with a head start.
  733.   If Xerox, Lotus, and Apple are permitted to make law through the
  734. courts, the precedent will hobble the software industry:
  735.    * Gratuitous incompatibilities will burden users.  Imagine if each
  736.      car manufacturer had to arrange the pedals in a different order.
  737.    * Software will become and remain more expensive.  Users will be
  738.      "locked in" to proprietary interfaces, for which there is no real
  739.      competition.
  740.    * Large companies have an unfair advantage wherever lawsuits become
  741.      commonplace.  Since they can easily afford to sue, they can
  742.      intimidate small companies with threats even when they don't
  743.      really have a case.
  744.    * User interface improvements will come slower, since incremental
  745.      evolution through creative imitation will no longer be permitted.
  746.    * Even Apple, etc., will find it harder to make improvements if they
  747.      can no longer adapt the good ideas that others introduce, for fear
  748.      of weakening their own legal positions.  Some users suggest that
  749.      this stagnation may already have started.
  750.    * If you use GNU software, you might find it of some concern that
  751.      user interface copyright will make it hard for the Free Software
  752.      Foundation to develop programs compatible with the interfaces that
  753.      you already know.
  754. File: eplain.info,  Node: What to do?,  Prev: User interface copyright,  Up: Freedom
  755. What to do?
  756. ===========
  757.   (This section is copied from the GCC manual, by Richard Stallman.)
  758.   To protect our freedom from lawsuits like these, a group of
  759. programmers and users have formed a new grass-roots political
  760. organization, the League for Programming Freedom.
  761.   The purpose of the League is to oppose new monopolistic practices such
  762. as user-interface copyright and software patents; it calls for a return
  763. to the legal policies of the recent past, in which these practices were
  764. not allowed.  The League is not concerned with free software as an
  765. issue, and not affiliated with the Free Software Foundation.
  766.   The League's membership rolls include John McCarthy, inventor of Lisp,
  767. Marvin Minsky, founder of the Artificial Intelligence lab, Guy L.
  768. Steele, Jr., author of well-known books on Lisp and C, as well as
  769. Richard Stallman, the developer of GNU CC.  Please join and add your
  770. name to the list.  Membership dues in the League are $42 per year for
  771. programmers, managers and professionals; $10.50 for students; $21 for
  772. others.
  773.   The League needs both activist members and members who only pay their
  774. dues.
  775.   To join, or for more information, phone (617) 492-0023 or write to:
  776.      League for Programming Freedom
  777.      1 Kendall Square #143
  778.      P.O. Box 9171
  779.      Cambridge, MA 02139
  780.   You can also send electronic mail to `league@prep.ai.mit.edu'.
  781.   Here are some suggestions from the League for things you can do to
  782. protect your freedom to write programs:
  783.    * Don't buy from Xerox, Lotus or Apple.  Buy from their competitors
  784.      or from the defendants they are suing.
  785.    * Don't develop software to work with the systems made by these
  786.      companies.
  787.    * Port your existing software to competing systems, so that you
  788.      encourage users to switch.
  789.    * Write letters to company presidents to let them know their conduct
  790.      is unacceptable.
  791.    * Tell your friends and colleagues about this issue and how it
  792.      threatens to ruin the computer industry.
  793.    * Above all, don't work for the look-and-feel plaintiffs, and don't
  794.      accept contracts from them.
  795.    * Write to Congress to explain the importance of this issue.
  796.           House Subcommittee on Intellectual Property
  797.           2137 Rayburn Bldg
  798.           Washington, DC 20515
  799.           
  800.           Senate Subcommittee on Patents, Trademarks and Copyrights
  801.           United States Senate
  802.           Washington, DC 20510
  803.      (These committees have received lots of mail already; let's give
  804.      them even more.)
  805.   Express your opinion!  You can make a difference.
  806.